package com.heima.task.job;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class HelloJob {


    @Scheduled(cron = "1-10 * * * * ?")
    public void eat(){
        System.out.println("方法执行了:"+new Date());
    }
}
